package com.cdu.ai_intelligent_teaching_and_training_system.domain;

/**
 * 
 * @TableName exam_result
 */
public class ExamResult {
    /**
     * 
     */
    private Integer resultId;

    /**
     * 
     */
    private Integer examId;

    /**
     * 
     */
    private Integer studentId;

    /**
     * 
     */
    private Double score;

    /**
     * 
     */
    private String feedback;

    /**
     * 
     */
    public Integer getResultId() {
        return resultId;
    }

    /**
     * 
     */
    public void setResultId(Integer resultId) {
        this.resultId = resultId;
    }

    /**
     * 
     */
    public Integer getExamId() {
        return examId;
    }

    /**
     * 
     */
    public void setExamId(Integer examId) {
        this.examId = examId;
    }

    /**
     * 
     */
    public Integer getStudentId() {
        return studentId;
    }

    /**
     * 
     */
    public void setStudentId(Integer studentId) {
        this.studentId = studentId;
    }

    /**
     * 
     */
    public Double getScore() {
        return score;
    }

    /**
     * 
     */
    public void setScore(Double score) {
        this.score = score;
    }

    /**
     * 
     */
    public String getFeedback() {
        return feedback;
    }

    /**
     * 
     */
    public void setFeedback(String feedback) {
        this.feedback = feedback;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ExamResult other = (ExamResult) that;
        return (this.getResultId() == null ? other.getResultId() == null : this.getResultId().equals(other.getResultId()))
            && (this.getExamId() == null ? other.getExamId() == null : this.getExamId().equals(other.getExamId()))
            && (this.getStudentId() == null ? other.getStudentId() == null : this.getStudentId().equals(other.getStudentId()))
            && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore()))
            && (this.getFeedback() == null ? other.getFeedback() == null : this.getFeedback().equals(other.getFeedback()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getResultId() == null) ? 0 : getResultId().hashCode());
        result = prime * result + ((getExamId() == null) ? 0 : getExamId().hashCode());
        result = prime * result + ((getStudentId() == null) ? 0 : getStudentId().hashCode());
        result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode());
        result = prime * result + ((getFeedback() == null) ? 0 : getFeedback().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", resultId=").append(resultId);
        sb.append(", examId=").append(examId);
        sb.append(", studentId=").append(studentId);
        sb.append(", score=").append(score);
        sb.append(", feedback=").append(feedback);
        sb.append("]");
        return sb.toString();
    }
}